home *** CD-ROM | disk | FTP | other *** search
/ Zoom 2 / Zoom - Release 2 (1996)(Active Software)[!].iso / graphics / raytracing / dust / theexample.bat < prev    next >
DOS Batch File  |  1995-03-05  |  624b  |  43 lines

  1. ;This script creates a plane and applies the function sin(x^2+y^2) to it
  2. ;init
  3. set(onlinecalc,t)
  4. set(complete,f)
  5.  
  6. ;parameters
  7. buffer=2
  8. xmin:=-50
  9. xmax:=50
  10. ymin:=-50
  11. ymax:=50
  12. z:=0
  13. xsect:=10
  14. ysect:=10
  15.  
  16.  
  17. ;doit
  18. xstep=(xmax-xmin)/(xsect-1)
  19. ystep=(ymax-ymin)/(ysect-1)
  20.  
  21. for(i,0,xsect-2)
  22.  x1=xmin+i*xstep
  23.  x2=x1+xstep
  24.  for(j,0,ysect-2)
  25.   y1=ymin+j*ystep
  26.   y2=y1+ystep
  27.   addface(buffer,x1,y1,z,x2,y1,z,x2,y2,z)
  28.   addface(buffer,x1,y1,z,x1,y2,z,x2,y2,z)
  29.  end
  30. end
  31.  
  32. ;only for Imagine-users
  33. merge(buffer)
  34.  
  35. ;show the result
  36. set(rotx,138)
  37. set(rotz,330)
  38. set(zoom,1.2)
  39. window(buffer)
  40.  
  41. ;plot the function
  42. func(2,30*sin((x0*x0+y0*y0)/25),0,z)
  43.